import request from '@/utils/request'
// 委托代理人受理 API接口
const apl_agent_Api = {
    list: '/apl_agent/list',
    getAgentWithGroup: '/apl_agent/getAgentWithGroup',
    getAgentByApplyid: '/apl_agent/getAgentByApplyid',
    deleteAttachId: '/apl_agent/deleteAttachId',
    updateAttachId: '/apl_agent/updateAttachId', // 更新附件id
    saveAgent: '/apl_agent/save', // 保存第三人
}
/**
 * 查看委托代理人数据
 * @param {*} body
 */
export function getAgentlist (body) {
    return request({
        url: apl_agent_Api.list,
        method: 'post',
        data: body
    })
}

/**
 * 查看委托代理人数据
 * @param {*} parameter
 */
export function getAgentWithGroup (parameter) {
    return request({
        url: apl_agent_Api.getAgentWithGroup,
        method: 'post',
        params: parameter
    })
}

/**
 * 查看委托代理人数据
 * @returns
 */
export function getAgentByApplyid (parameter) {
    return request({
        url: apl_agent_Api.getAgentByApplyid,
        method: 'post',
        params: parameter
    })
}

/**
 *  删除附件id
 * @param {*} parameter
 * @returns
 */
export function deleteAgentFile (parameter) {
    return request({
      url: apl_agent_Api.deleteAttachId,
      method: 'post',
      params: parameter
    })
  }


  /**
 * 更新附件id
 */
export function updateAgentAttachId (parameter) {
    return request({
        url: apl_agent_Api.updateAttachId,
        method: 'post',
        params: parameter
    })
  }

/**
 * 保存委托代理人
 * @param {} body
 * @returns
 */
export function saveAgent (body) {
    return request({
        url: apl_agent_Api.saveAgent,
        method: 'post',
        data: body
    })
}